
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>石油化学品部門｜お問合せ｜JX日鉱日石サンエナジー株式会社</title>
<meta name="description" content="新日本石油と新日鉱ホールディングスが経営統合し、ＪＸグループに。総合エ
ネルギー・資源・素材企業グループとして、歩みはじめます。" />
<meta name="keywords" content="ＪＸグループ,ＪＸホールディングス,新日本石油,新日鉱ホールディングス,エネルギ
ー,資源,素材" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<meta name="robots" content="index, follow" />
<meta name="revisit-after" content="7 days" />
<meta http-equiv="pragma" content="no-cache" />
<link rel="stylesheet" type="text/css" href="/common/css/import.css" media="all" />
<link rel="stylesheet" type="text/css" href="css/import.css" media="all" />
<link rel="stylesheet" type="text/css" href="css/fontsize_default.css" media="screen,print" class="fontsize" id="fontsize-default" title="文字サイズ：標準" />
<link rel="alternate stylesheet" type="text/css" href="css/fontsize_large.css" media="screen,print" class="fontsize" id="fontsize-large" title="文字サイズ：大" />

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.easing.js"></script>
<script type="text/javascript" src="js/jquery.scrollTo.js"></script>
<script type="text/javascript" src="js/styleswitcher.js"></script>
<script type="text/javascript" src="js/rollover.js"></script>
<script type="text/javascript" src="js/common.js"></script>

<style type="text/css" media="screen,print">
#fontsize-selector {
	display: block !important;
}
</style>
<script type="text/javascript" src="/common/js/print.js"></script>
<!-- ADD JS -->

<script type="text/javascript" src="/common/js/swfobject.js"></script>
<script type="text/javascript" src="/common/js/swfloader.js"></script>
<script type="text/javascript" src="/common/js/randombnr.js"></script>
<script type="text/javascript" src="/common/js/urchin.js"></script>
<script type="text/javascript">urchinTracker();</script>

<link rel="stylesheet" href="commons/mailform.css" type="text/css" />
</head>
<body>
<?php 
    if(array_key_exists('check_confirm', $_POST)) {
        
        //list expected fields
        $expected = array(
              			'inquiry', 
              			'name01',
              			'lastName01',
              			'name02',
              			'lastName02',
              			'sign',
              			//'postalCode',
              			//'name03',
              			//'select_option',
              			//'county',
              			//'street',
              			//'apartmentName',
              			//'phoneNumber01',
              			//'phoneNumber02',
              			//'phoneNumber03',
              			//'fax01',
              			//'fax02',
              			//'fax03',
              			//'email01',
              			//'email02',
              			'radio_confirm'
              			
              		);
		//var_dump($expected);exit;
        //set required fields
        $required = array(
                			'inquiry', 
                			'name01',
                			'lastName01',
                			'name02',
                			'lastName02',
                			//'postalCode',
                			//'name03',
                			//'select_option',
                			//'county',
                			//'street',
                			//'phoneNumber01',
                			//'phoneNumber02',
                			//'phoneNumber03',
                			//'fax01',
                			//'fax02',
                			//'fax03',
                			//'email01',
                			//'email02',
                			'radio_confirm'
                			
                		);
        //create empty array for any missing fields
        $missing = array();
        //process the $_POST variables
        foreach ($_POST as $key => $value) {
            //assign to temporay variable and strip white space
            $temp = is_array($value) ? $value : trim($value);
            //if empty and required, add to $missing array
            if(empty($temp) && in_array($key, $required)){
                array_push($missing, $key);
                }
            //otherwise, assign to a variable of the same name as $key
            elseif(in_array($key, $expected)) {
                ${$key} = $temp;
            }
        }
		
        
}
?>
<div id="headerContainer">
	<div id="header">
		<div class="logoMark">

			<p><a href="/index.html"><img width="358" height="42" alt="ＪＸ日鉱日石エネルギー" src="/common/images/com_logo01.jpg" /></a></p>
			<!-- /logoMark -->
		</div>
		<div id="utilityBox">
			<div class="item01">
				<div class="siteUtility01">
					<ul>					
						<li class="sitemap"><a href="/sitemap/index.html"><img width="57" height="11" class="rollover" alt="サイトマップ" src="/common/images/head_tx01.gif" /></a></li>
						
					</ul>

					<!-- /siteUtility01 -->
				</div>
				
				<!-- /item01 -->
			</div>
			<div class="fontSizeNavi">
				<div class="inner">
					<dl>
						<dt><img width="51" height="11" alt="文字サイズ" src="/common/images/head_tx04.gif" /></dt>
						<dd>

							<script src="/common/js/styleswitcher.btn.js" type="text/javascript"></script>							
							<p class="fontLink"><a href="/textsize/index.html"><img width="47" height="10" class="rollover" alt="変更方法" src="/common/images/head_tx02.gif" /></a></p>
						</dd>
					</dl>
				</div>
				<!-- /fontSizeNavi -->
			</div>
			<!-- /utilityBox -->
		</div>

		<div id="globalNavi">
			<ul>
				<li><a href="/index.html" class="top">TOP</a></li>
				<li><a href="/company/index.html" class="aboutUs">会社情報</a></li>
				<li class="current"><a href="/business/index.html" class="aboutDivision">部門紹介</a></li>
				<li><a href="/product/index.html" class="products">取扱商品</a></li>
			</ul>

		</div>
		<!-- /header -->
	</div>
	<!-- /headerContainer -->
</div>

<div id="categoryTitleContainer">
  <div class="categoryTitle">
		<p><img width="190" height="23" alt="石油化学品部門" src="/business/petrochemicals/images/petrochemicals_ti01.gif" /></p>
		<!-- /categoryTitle -->
	</div>
</div><!-- / #categoryTitleContainer -->

<div class="naviContainer">
		<div class="topicPath">
			<p>
				<span class="home"><a href="/index.html">TOP</a></span>
				<span><a href="/business/index.html">部門紹介</a></span>
				<span>石油化学品部門</span>	
			</p>
			<!-- /topicPath -->
		</div>
		<!--div class="printBtn">
			<p>
				<script src="/common/js/print_button.js" type="text/javascript"></script>
				<a title="別ウィンドウで開きます" target="print" href="?style=print"><img width="86" height="13" class="rollover" alt="印刷用ページ" src="/common/images/com_tx01.gif"></a> </p>
		</div-->
		<!-- /naviContainer -->
	</div>

<div id="mainContainer">
  <?php 
    
		$file = "form_input.php";
		if ($_POST && isset($missing) && $missing)
		{
			$file = "error.php";
		}
		elseif ($_POST && isset($_POST['check_confirm']) && !$missing)
		{
			$file = "confirm.php";
		}
		elseif ($_POST && isset($_POST['confirm']) )
		{
		  
      $to = "sun-energy@you.ne.jp";
	  $fullName = "JX Nippon Sun-Energy Corporation";
	  $subject = "Inquiry from Website";
      //build the message 
      $inquiry        =  $_POST['inquiry']; 
      $name01         =  $_POST['name01'];
      $lastName01     =  $_POST['lastName01'];
      $name02         =  $_POST['name02'];
      $lastName02     =  $_POST['lastName02'];
      $sign           =  $_POST['sign'];
      $postalCode     =  $_POST['postalCode'];
      $name03         =  $_POST['name03'];
      $select_option  =  $_POST['select_option'];
      $county         =  $_POST['county'];
      $street         =  $_POST['street'];
      $apartmentName  =  $_POST['apartmentName'];
      $phoneNumber01  =  $_POST['phoneNumber01'];
      $phoneNumber02  =  $_POST['phoneNumber02'];
      $phoneNumber03  =  $_POST['phoneNumber03'];
      $fax01          =  $_POST['fax01'];
      $fax02          =  $_POST['fax02'];
      $fax03          =  $_POST['fax03'];
      $email1         =  $_POST['email01'];
      $email2         =  $_POST['email02'];
      $radio_confirm  =  $_POST['radio_confirm'];
      //limit line lenght to 70 chars
	  $headers = "From: ".$fullName." <$to> X-Mailer: PHP/" . phpversion();
	  $headers .= "\r\nCc: ".$to."\r\n";
	  $headers .= "MIME-Version: 1.0\r\n";
	  $headers .= "Content-Type: text/html; charset=UTF-8\r\n";

      $message = "";
      $message.= "お問合せ内容: ".$inquiry."<br />"."お名前: ".$lastName01." - ".$name01."<br />"."フリガナ: ".$lastName02." - ".$name02."<br />"."会社名・部署名: ".$sign."<br />"."郵便番号: ".$postalCode." - ".$name03."<br />"."都道府県: ".$select_option."<br />"."市区郡: ".$county."<br />"."町村番地: ".$street."<br />"."アパート・マンション名: ".$apartmentName."<br />"."電話番号: ".$phoneNumber01." - ".$phoneNumber02." - ".$phoneNumber03."<br />"."FAX番号: ".$fax01." - ".$fax02." - ".$fax03."<br />"."E-mailアドレス: ".$email1."<br />"."E-mailアドレス（確認）: ".$email2."<br />"."個人情報開示のご確認<span>必須</span>: ".$radio_confirm;
	  
      $message = wordwrap($message,500);
      
      //Send it
      try {
        
        $mailSent = mail($email1.','.$email2, $subject, $message, $headers);
        if ($mailSent) {
            //echo 'xxxx';exit;
            $file = "complete.php";
        }
        else
        {
          $file = "form_input.php";
        }
      } catch(exception $e)
      {
        $file = "form_input.php";
      }
		}
		
		include $file;
  
  ?>
  
  <div id="asideContents">
			<div id="asideNavi">
				<dl>
					<dt><a href="index.html">部門紹介</a></dt>
					<dd>
						<ul>
							<li><a href="/business/fueloil.html">燃料油部門</a> </li>
							<li><a href="/business/development.html">事業開発部門</a></li>
							<li><a href="/business/marine.html">舶用部門</a></li>
							<li><a href="/business/lubricants.html">潤滑油部門</a></li>
							<li><a href="/business/petrochemicals/index.html">石油化学品部門</a></li>
							<li><a href="/business/others.html">その他部門</a> </li>
						</ul>
						
					</dd>
				</dl>
				<!-- /asideNavi -->
			</div>
			<!-- /asideContents -->
		</div>
</div><!-- / #pageBody -->

<div id="footerContainer">
	<div id="footer">
		<div class="siteUtility">
			<ul>
				<li><a href="/privacy/index.html"><img width="135" height="15" class="rollover" alt="プライバシーポリシー" src="/common/images/foot_tx01.gif" /></a></li>
				<li><a href="/guide/index.html"><img width="123" height="15" class="rollover" alt="このサイトについて" src="/common/images/foot_tx02.gif" /></a></li>
				<li><a href="/public_notice/index.html"><img width="64" height="15" class="rollover" alt="電子公告" src="/common/images/foot_tx03.gif" /></a></li>
				<li><a href="/about/index.html"><img width="80" height="15" class="rollover" alt="JXグループ" src="/common/images/foot_tx04.gif" /></a></li>
			</ul>
			<div class="pageUp">
				<p><a href="#headerContainer"><img width="128" height="16" class="rollover" alt="このページの上部へ" src="/common/images/foot_tx05.gif" /></a></p>
				<!-- /pageUp -->
			</div>
			<!-- /siteUtility -->
		</div>
		<div class="groupBox">
			<div class="logoMark">
				<p><img width="80" height="14" alt="ＪＸグループ" src="/common/images/footer_logo.gif" /></p>
				<!-- /logoMark -->
			</div>
			<div class="groupLink">
				<ul>
					<li><a target="_blank" href="http://www.hd.jx-group.co.jp"><img width="112" height="14" alt="ＪＸホールディングス" src="/common/images/footer_logo02.gif" /></a></li>
					<li><a target="_blank" href="http://www.noe.jx-group.co.jp"><img width="127" height="14" alt="JX日鉱日石エネルギー" src="/common/images/footer_logo05.gif" /></a></li>
					<li><a target="_blank" href="http://www.nex.jx-group.co.jp"><img width="96" height="14" alt="ＪＸ日鉱日石開発" src="/common/images/footer_logo03.gif" /></a></li>
					<li><a target="_blank" href="http://www.nmm.jx-group.co.jp"><img width="96" height="14" alt="ＪＸ日鉱日石金属" src="/common/images/footer_logo04.gif" /></a></li>
				</ul>
				<!-- /groupLink -->
			</div>
			<!-- /groupBox -->
		</div>
		<div class="copyright">
			<p><img width="341" height="11" alt="Copyright© JX Nippon Oil &amp; Energy Corporation All Rights Reserved." src="/common/images/copy_tx01.gif" /></p>
		</div>
		<!-- /footer -->
	</div>
	<!-- /footerContainer -->
</div>
</body>
</html>